package org.mics.token.config;
/**
 * 存储用户的线程类
 * @author mics
 * @date 2022-5-30
 * @version  1.0
 */

public class UserThreadLocal {
	/**
	 * 存储用户的线程变量
	 */
	private static ThreadLocal<String> userLocal = new ThreadLocal<String>();
	
	public static void setUser(String userId) {
		userLocal.set(userId);
	}
	
	public static String getUser() {
		return userLocal.get();
	}
	
	public static void remove() {
		userLocal.remove();
	}
}
